package com.legoo.studaychineseonline.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.legoo.studaychineseonline.R;

import java.util.List;

public class ClassFragmentTimeAdapter extends BaseQuickAdapter<String, BaseViewHolder> {

    public ClassFragmentTimeAdapter(int layoutResId, @Nullable List<String> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, String item) {
        int adapterPosition = helper.getAdapterPosition();
        if (adapterPosition ==7){
            helper.setBackgroundRes(R.id.tv_time,R.mipmap.img_class_bg_dark);
        }
        helper.setText(R.id.tv_time,"12/4\n"+"周六\n"+"有课"+adapterPosition);

    }
}
